﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;



namespace WemoConnect1
{
    class Program
    {
        static void Main(string[] args)
        {
            var portReader = new WemoPortReader();
            var port = portReader.ReadPort();
            if (port == 0) return;

            var pp = new BelkinControl();
            pp.SendCmd(port, new GetDbVersionCommand());
            pp.SendCmd(port, new ReadRulesCommand());

            //pp.SendCmd(port, new SendRulesCommand("rules.zip"));
            //pp.SendCmd(port, new SetDbVersionCommand(161));
            //pp.SendCmd(port, new GetDbVersionCommand());
        }

    }
}
